<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" isErrorPage="true"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="org.slf4j.Logger,org.slf4j.LoggerFactory"%>
<%
	response.setStatus(200);
%>

<%
	Throwable ex = null;
	if (exception != null) {
	    ex = exception;
    }
	Throwable t = (Throwable) request.getAttribute("javax.servlet.jsp.jspException");
	if (t == null) {
		if (request.getAttribute("javax.servlet.error.exception") != null) {
	         ex = (Throwable) request.getAttribute("javax.servlet.error.exception");
        }
	} else {
		ex = t;
	}

	//记录日志
	Logger logger = LoggerFactory.getLogger("500.jsp");
	if (ex != null) {
	    logger.error(ex.getMessage(), ex);
    }
%>

<!DOCTYPE HTML>
<html>
<head>
<title>500 - 系统内部错误</title>
</head>

<body>
	<div>
		<h1>系统发生内部错误.</h1>
	</div>
	<div>
		<a href="<c:url value="/"/>">返回首页</a>
	</div>
</body>
</html>
